package com.yuqiao.read.jvm;

import java.util.ArrayList;
import java.util.List;

/**
 * -Xms20m -Xmx20m -XX:+HeapDumpOnOutOfMemoryError
 * 堆内存溢出
 */
public class OomExceptionTest {
    public static void main(String[] args) {
        List<OomExceptionTest> list = new ArrayList<>();
        while (true){
            list.add(new OomExceptionTest());
        }
    }
}
